<html>
<head><meta charset="utf-8"><title>Datalog as an oracle · t-compiler/wg-polonius · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/index.html">t-compiler/wg-polonius</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Datalog.20as.20an.20oracle.html">Datalog as an oracle</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206265442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Datalog%20as%20an%20oracle/near/206265442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Datalog.20as.20an.20oracle.html#206265442">(Aug 07 2020 at 14:44)</a>:</h4>
<blockquote>
<p>and perhaps that means that the optimized variants don't even use datalog</p>
</blockquote>
<p>One thing you could do is have datalog be the slow but readable version and use it as a testing oracle for property based testing. Then you can throw randomized code at both and ensure that they have the same results. ￼</p>



<a name="206270356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Datalog%20as%20an%20oracle/near/206270356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Datalog.20as.20an.20oracle.html#206270356">(Aug 07 2020 at 15:21)</a>:</h4>
<p>great point, and apart from having the randomized inputs or getting them via fuzzing, we already have a way to compare two variants (which we used to test that the Naive and Optimized variants behaved similarly, but only on rustc tests)</p>



<a name="206575276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Datalog%20as%20an%20oracle/near/206575276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Vytautas Astrauskas [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Datalog.20as.20an.20oracle.html#206575276">(Aug 11 2020 at 13:35)</a>:</h4>
<blockquote>
<p>Then you can throw randomized code at both and ensure that they have the same results.</p>
</blockquote>
<p>Might be useful: <a href="https://ieeexplore.ieee.org/abstract/document/7372036">https://ieeexplore.ieee.org/abstract/document/7372036</a></p>



<a name="206742766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/186049-t-compiler/wg-polonius/topic/Datalog%20as%20an%20oracle/near/206742766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/186049-t-compiler/wg-polonius/topic/Datalog.20as.20an.20oracle.html#206742766">(Aug 12 2020 at 19:56)</a>:</h4>
<p>syntactically-valid and semantically-valid are just optimizations <span aria-label="wink" class="emoji emoji-1f609" role="img" title="wink">:wink:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>